// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
import QtQuick 1.1

Image{
    id: _root
    source: ""
    property string pressedSource: ""

    signal pressed(variant mouse)
    signal released(variant mouse)

    MouseArea{
        id: _mouse
        anchors.fill: parent
        onPressed: {
            _root.pressed(mouse);
        }
        onReleased: {
            _root.released(mouse);
        }
        onCanceled: {
            _root.released(mouse);
        }
    }
    states: [
        State {
            name: "Pressed"
            when: _mouse.pressed
            PropertyChanges {
                target: _root
                source: pressedSource
            }
        }
    ]
}
